package com.heqiang.spring.service.common;

import com.heqiang.spring.BeansException;
import com.heqiang.spring.bean.PropertyValue;
import com.heqiang.spring.bean.PropertyValues;
import com.heqiang.spring.config.BeanDefinition;
import com.heqiang.spring.config.BeanFactoryPostProcessor;
import com.heqiang.spring.factory.ConfigurableListableBeanFactory;

public class MyBeanFactoryPostProcessor implements BeanFactoryPostProcessor {

    @Override
    public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {
        BeanDefinition beanDefinition = beanFactory.getBeanDefinition("testService");
        PropertyValues propertyValues = beanDefinition.getPropertyValues();
        propertyValues.addProperValue(new PropertyValue("company","掌门教育"));
    }
}
